package com.longshine;

/**
 * @Author xiongmin
 * @Description TODO
 * @Date 2019/11/7 11:13
 * @Version 1.0
 **/
public class SignalClass{

    private static SignalClass signalClass = new SignalClass();

    public static SignalClass getInstance() {
        return signalClass;
    }

    private SignalClass(){}

    public void sayHello() {
        System.out.println("hello, world! This is SigleClass!");
    }

    public static void main(String[] args) {
        SignalClass.getInstance().sayHello();
        System.out.println('b' + 10);

        int i = 10;
        i = i++ == 10 ? ++i : --i;
        System.out.println(i);

        System.out.println((i > 4) ? 9 : 99.9);

        SignalClass signalClass = new SignalClass();
        change(signalClass.str,signalClass.ch);
        System.out.println(signalClass.str + "|" + new String(signalClass.ch));
    }

    private static void change(String str, char[] ch) {
        str = "woha";
        ch[0] = '2';
    }

    String str = "nihao";
    char[] ch = {'a','b','c'};
}
interface Test {
    int  nia = 10;
}
